package com.example.demo;


import org.springframework.web.bind.annotation.*;

@RequestMapping("/user")
@RestController
public class UserController {
    //即支持get,有支持post
    @RequestMapping("/1")
    public String m1(){
        return "m1";
    }
    //只支持get
    @RequestMapping(value = "/m2",method = RequestMethod.GET)
    public String m2(){
        return "m2";
    }
    //只支持get
    @GetMapping("/m3")
    public String m3(){
        return "m3";
    }
    //只支持m4
    @PostMapping("/m4")
    public String m4(){
        return "m4";
    }
}


